myonload=function(myym){
	let xml;
	let url="/employee/findExcludeeStatus";
	let eStatus=2;
	if(myym=="xg")
	eStatus=0;
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){
			if(xml.responseText!="null"&&xml.responseText!="")
			{
				let t=JSON.parse(xml.responseText);
				for(let i=0;i<t.data.length;i++){
				setmessage(t.data[i].e_L1InstID,t.data[i].e_L2InstID,t.data[i].e_L3InstID,
					t.data[i].eName,t.data[i].eGender,t.data[i].ePositionName,
					t.data[i].eID,myym,t.data[i].eStatus)
				}
			}

		}
	}
	xml.open("post",url,true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send("eStatus="+eStatus);
}
setmessage=function(one,tow,third,name,sex,zwmc,eID,myym,stu){
	let maxbox=document.getElementsByClassName('mymainbox')[0];	
	let box1=document.createElement('div');
	box1.className='myemployees';
	let box2=document.createElement('div');
	let box3=document.createElement('div');
	let box4=document.createElement('div');
	let box5=document.createElement('div');
	let box6=document.createElement('div');
	let box7=document.createElement('div');
	let box8=document.createElement('div');
	let box9=document.createElement('div');
	let box10=document.createElement('div');
	let a=document.createElement('a');
	let b=document.createElement('a');
	a.className="nav-link pl-3";
	b.className="nav-link pl-3";
	if(myym=="fh"){
	a.href="employeereviewone.html?eID="+eID;
	a.innerText="复核";
	}
	else 
	{
		a.innerText="修改";
		if(stu!="2")
	{
		a.href="updateem.html?eID="+eID;
		b.innerText="删除";
	}
		else 
		{
		a.href="";
		b.innerText="恢复";
		}
	}
	let lable=document.createElement("label");
	lable.className="fuhe";
	let lable1=document.createElement("label");
	lable1.className="fuhe";
	lable.appendChild(a);
	lable1.appendChild(b);
	box2.className='reviewbox1';
	box3.className='reviewbox2';
	box4.className='reviewbox2';
	box5.className='reviewbox2';
	box6.className='reviewbox2';
	box7.className='reviewbox2';
	box8.className='reviewbox2';
	box9.className='reviewbox2';
	box10.className='reviewbox2';
	box9.appendChild(lable);
	box10.appendChild(lable1);
	box2.innerText=eID;
	box3.innerText=name;
	box4.innerText=sex;
	box5.innerText=one;
	box6.innerText=tow;
	box7.innerText=third;
	box8.innerText=zwmc;
	box1.appendChild(box2);
	box1.appendChild(box3);
	box1.appendChild(box4);
	box1.appendChild(box5);
	box1.appendChild(box6);
	box1.appendChild(box7);
	box1.appendChild(box8);
	box1.appendChild(box9);
	box1.appendChild(box10);
	maxbox.appendChild(box1);
	b.onclick=function(){
		let xml;
		let x;
		if(b.innerText=="删除")
		{
			x=2;
			a.href="";
		}
		else
		{
			x=0;
		a.href="updateem.html?eID="+eID;
		}
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){

			if(JSON.parse(xml.responseText).status==200)
			{
				alert("成功");
				let mya=document.createElement('a');
				mya.href="glemployee.html";
				mya.click();
			}
		}
	}
	xml.open("post","/employee/delete",true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send('eStatus='+x+'&eID='+eID);
	}
}
